<template>
  <div class="playpage-header">
    <div
      class="left icon_base"
      @click="$parent.$parent.showPlayBar = true"
    ></div>

    <div class="right icon_base" @click="showShare = true"></div>

    <van-share-sheet
      v-model="showShare"
      title="立即分享给好友"
      :options="options"
    />
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  computed: mapState(["currentSong"]),

  data() {
    const options = [
      [
        { name: "微信", icon: "wechat" },
        { name: "微博", icon: "weibo" },
        { name: "复制链接", icon: "link" },
        { name: "分享海报", icon: "poster" },
        { name: "二维码", icon: "qrcode" },
      ],
    ];
    return {
      showShare: false,
      options,
    };
  },
};
</script>

<style lang="less" scoped>
.playpage-header {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: space-between;

  .left,
  .right {
    width: 40px;
    height: 100%;
  }

  .left {
    background-image: url("../../../assets/向下.png");
  }

  .right {
    background-image: url("../../../assets/分享_top.png");
  }
}
</style>
